import env from '../../build/env';

const SERVER_DOMAIN = env === 'development'
		? 'localhost:8080'
		: env === 'production'
			? 'www.url.com'
			: 'debug.url.com',
	SERVER_HOST = '//' + SERVER_DOMAIN + '/',
	API = {
		LOGIN: '/base/user/login',
		USER_LIST: '/base/user/list',
		USER_SAVE: '/base/user/save',
		USER_DETAIL: '/base/user/detail',

		ROLE_LIST: '/base/role/list',
		ROLE_SAVE: '/base/role/save',
		ROLE_DETAIL: '/base/role/detail',

		MENU_LIST: '/base/menu/list',
		MENU_SAVE: '/base/menu/save',
		MENU_DETAIL: '/base/menu/detail'
	},
	output = {};

for (let key in API) {
	output[key] = /*SERVER_HOST + */API[key];
}

output['SERVER_DOMAIN'] = SERVER_DOMAIN;
output['SERVER_HOST'] = SERVER_HOST;

export default output;
